{extend name="default/base/base_seller" /}
{block name="seller_main"}


<div class="dssc-form-default">
    <form id="add_form" action="{:url('Selleraccount/account_add')}" method="post">
        <dl>
            <dt><i class="required">*</i>职员账号：</dt>
            <dd>
                <input class="w120 text" name="member_name" value=""  style="width: 250px !important;" type="text" autocomplete="off" title="" />
                <span></span>
                <p class="hint">*：账号一旦设置，不能修改</p>
            </dd>
        </dl>
        <!-- <dl>
            <dt><i class="required"></i>客服：</dt>
            <dd><select name="customer_id">
                <option>请选择</option>
                  {foreach name="customer" item="value" }
                  <option value="{$value.id}">{$value.name}</option>
                  {/foreach}
                </select>
                <span></span>
              <p class="hint"></p>
            </dd>
          </dl> -->
        <dl>
            <dt><i class="required">*</i>{$Think.lang.user_password}{$Think.lang.ds_colon}</dt>
            <dd>
                <input class="w120 text" name="password" type="password" value="" id="password" style="width: 250px !important;" title="" />
                <span></span>
                <p class="hint"></p>
            </dd>
        </dl>
        <dl>
          <dt><i class="required">*</i>职员姓名</dt>
          <dd>
              <input class="w120 text" name="true_name" value=""  style="width: 250px !important;" type="text" id="member_name" autocomplete="off" title="" />
              <span></span>
          </dd>
        </dl>
        <dl>
          <dt><i class="required">*</i>性别</dt>
          <dd>
              <select name="sex" title="">
                  <option value="1">男</option>
                  <option value="2">女</option>
              </select>
            <p class="hint"></p>
          </dd>
        </dl>
        <dl>
          <dt><i class="required">*</i>身份证号码</dt>
          <dd>
              <input class="w120 text" name="idcard" value=""  style="width: 250px !important;" type="text" id="seller_name" autocomplete="off" title="" />
              <span></span>
            <p class="hint"></p>
          </dd>
        </dl>
        <dl>
          <dt><i class="required">*</i>手机号</dt>
          <dd>
              <input class="w120 text" name="mobile" value=""  style="width: 250px !important;" type="text" autocomplete="off" title="" />
          </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.position}{$Think.lang.ds_colon}</dt>
            <dd>
                <?php $position_list = get_account_position_list(); ?>
                <select name="status" title="">
                    {foreach name="position_list" item="value" }
                    <option value="{$value.id}">{$value.name}</option>
                    {/foreach}
                </select>
            </dd>
        </dl>
        <dl>
            <dt><i class="required">*</i>{$Think.lang.account_group}{$Think.lang.ds_colon}</dt>
            <dd><select name="group_id" title="">
                {foreach name="seller_group_list" item="value" }
                <option value="{$value.sellergroup_id}">{$value.sellergroup_name}</option>
                {/foreach}
            </select>
                <span></span>
                <p class="hint"></p>
            </dd>
        </dl>

        <div class="bottom">
            <input type="submit" class="submit" value="{$Think.lang.ds_submit}">
        </div>
  </form>
</div>
<script>
    $(document).ready(function(){
        $('#add_form').validate({
            onkeyup: false,
            errorPlacement: function(error, element){
                element.nextAll('span').first().after(error);
            },
            submitHandler:function(form){
                ds_ajaxpost('add_form', 'url', "{:url('Selleraccount/account_list')}");
            },
            rules: {
                group_id: {
                    required: true
                }
            },
            messages: {
                group_id: {
                    required: '<i class="iconfont">&#xe64c;</i>{$Think.lang.select_account_group}'
                }
            }
        });
    });
</script>

{/block}
